package com.github.shiqiyue.learn.guava;

import com.google.common.base.Preconditions;

/***
 * Preconditions（判断参数是否有效，如果无效，抛出异常） 测试
 * @author wenyao.wu
 * @date 2018/7/2
 */
public class PreconditionsTest {

    public static void main(String[] args) {
        Preconditions.checkArgument(1==1,"error:%s,%s", "1","2");
        //Preconditions.checkArgument(1==2,"error:%s,%s", "1","2");
        Preconditions.checkNotNull(new String());
        //Preconditions.checkNotNull(null);
        Preconditions.checkState(1==1);
        //Preconditions.checkState(1==2);
    }
}
